<%@ page language="java" contentType="text/html;charset=UTF-8" %>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack"%>

<%@ page import="com.scalar.chiptrack.utils.ConfigManager, com.scalar.forecast.projectSetup.ProjectForecast, java.util.LinkedList"%>
<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type="text/css" rel=stylesheet>
<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
<BODY bgColor="#ffffff" leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">

<SCRIPT language="JavaScript">
    function closeWindow()
    {
        window.close();
    }
</SCRIPT>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border="0">
    <TBODY>
    <TR>
	    <TD width='180' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'></TD>
        <TD bgcolor="#ffffff"><IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
        <TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
        <TD valign="top" width="100%">

        <IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/clear.gif" width=500 border=0>
        <BR>
<!-- from here your body starts -->
            <center><span class="NArialW">Forecast View</span></center>
            <table border="0" width="100%" cellpadding=0 cellspacing=0 align="center">
                <tr>
                    <td colspan="5" align=right>  <a href="javascript:closeWindow();"  onMouseOver="window.status='Click here to close this window';return true" title="Click here to close this window"><font class='NArialL'><b>[Close this window]</b></font></a> </td>
                </tr>
                <TR><TD class="NArialL" colspan="5" id="messageId"><chiptrack:messages type="info" styleClass="NArialL"/>&nbsp;</TD></TR>
                <TR><TD class="NArialL" colspan="5"><chiptrack:errors styleClass="NArialL" />&nbsp;</TD></TR>
                <% ProjectForecast projectForecast = (ProjectForecast)((LinkedList)request.getAttribute("rowDataList")).get(0);%>
                <TR>
                    <TD class="NArialL">Project Name:</TD>
                    <TD class="bodytext"><%=projectForecast.getProjName()%></TD>
                    <TD class="NArialL" width="3%">&nbsp;</TD>
                    <TD class="NArialL">Sales Person Name:</TD>
                    <TD class="bodytext"><%=projectForecast.getSalesPersonName()%></TD>
                </TR>
                <TR>
                    <TD>&nbsp;</TD>
                </TR>
                <tr>
                    <td colspan="5">
                        <table class="NArialL" align="center" border="0" width="100%">
                            <tr bgcolor='#993333' class="NArialL" align="middle">
                                <td><font color='#FFFFFF'>Product</font></td>
                                <td><font color='#FFFFFF'>Month</font></td>
                                <td><font color='#FFFFFF'>Year</font></td>
                                <td><font color='#FFFFFF'>Qty</font></td>
                                <td><font color='#FFFFFF'>Price</font></td>
                                <td><font color='#FFFFFF'>Confidence Level(%)</font></td>
                            </tr>
                            <% int rowCnt=0; %>
                            <logic:iterate name="rowDataList" id="rowData" scope="request">
                            <% rowCnt++;%>
                            <tr bgcolor='#DEE1E2' class="NArialL">
								<td class=NArialL><bean:write name="rowData" property="product"/></td>
                                <td class=NArialL><bean:write name="rowData" property="month"/></td>
                                <td class=NArialL><bean:write name="rowData" property="year"/></td>
                                <td class=NArialL align='right'><bean:write name="rowData" property="qty"/></td>
                                <td class=NArialL align='right'><bean:write name="rowData" property="price"/></td>
                                <td class=NArialL align='right'><bean:write name="rowData" property="confidenceLevel"/></td>
                            </tr>
                            </logic:iterate>
                            <%
                                if ( rowCnt == 0 )
                                {
                            %>
                                <TR>
                                    <TD colspan="5" class="NArialL"><FONT color='red'>No Forecast Details available</FONT></TD>
                                </tr>
                            <%
                                }
                            %>
                        </table>
                    </td>
                </tr>
                <tr><td>&nbsp;</td></tr>
            </table>
<!-- till here -->
        <TD>
    </TR>
    </TBODY>
</TABLE>
</BODY>
</HTML>


